package com.marion.mrpc.server;

import com.marion.common.utils.ReflectUtils;
import com.marion.mrpc.Request;

/**
 * 调用具体服务
 * @author marion
 * @date 2021/9/4
 */
public class ServiceInvoker {

    public Object invoke(ServiceInstance service, Request request) {
        return ReflectUtils.invoke(service.getTarget(), service.getMethod(), request.getParameters());
    }

}
